import App from './App'
import HttpTool from './HttpTool.js'
import WebSocketTool from './WebSocketTool.js'
import NeteaseCloudMusicTool from './NeteaseCloudMusicTool.js'
import PlayMusicTool from './PlayMusicTool.js'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  //全局参数
  app.config.globalProperties.msg = 'bar' 
  app.config.globalProperties.HttpTool = HttpTool
  app.config.globalProperties.WebSocketTool = WebSocketTool
  app.config.globalProperties.NeteaseCloudMusicTool = NeteaseCloudMusicTool
  app.config.globalProperties.PlayMusicTool = PlayMusicTool
  app.config.globalProperties.MusicList = []
  app.config.globalProperties.MusicMode = 0
  app.config.globalProperties.Device = uni.getSystemInfoSync()
  return {
    app
  }
}
// #endif